package com.neusoft.elmboot.service.impl;

import java.util.List;

import com.neusoft.elmboot.po.BusinessVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;

import com.neusoft.elmboot.mapper.BusinessMapper;
import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.service.BusinessService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BusinessServiceImpl implements BusinessService{

	@Resource
	private BusinessMapper businessMapper;

	@Override
	public List<Business> listBusinessByOrderTypeId(Integer orderTypeId) {
		return businessMapper.listBusinessByOrderTypeId(orderTypeId);
	}

	@Override
	public Business getBusinessById(Integer businessId) {
		return businessMapper.getBusinessById(businessId);
	}

	@Override
	public List<Business> listBusinessOrderByRating() {
		return businessMapper.listBusinessOrderByRating();
	}

	@Override
	public List<Business> listBusinessOrderBySaleVolume() {
		return businessMapper.listBusinessOrderByRatingVolume();
	}

	@Override
	public Integer addBusiness(BusinessVO vo) {
		return businessMapper.addBusiness(vo);
	}

	@Override
	public Integer update(BusinessVO vo) {
		return businessMapper.update(vo);
	}

	@Override
	public Integer delete(Integer id) {
		return businessMapper.delete(id);
	}

	@Override
	public List<Business> list() {
		List<Business> list = businessMapper.list();
		return  list;
	}

}
